All Questions
6 questions
2votes
1answer
190views
Javascript function which polls an async endpoint and inserts the result in a web page
I read about debounce this morning and ended up needing something similar to the concept in real life this evening to build a poll that checks whether a link I receive from an async call is ready to ...
1vote
2answers
420views
group countries by language in JavaScript
I need a better implementation than the below code (O(N) Solution), I am grouping countries by language ( data ) is the countries JSON, each country could have 0, 1 .. or more language as the object ...
3votes
0answers
34views
Testing whether pages can be fetched from two ports
I have an endpoint in my API which does a port test on 4455 and 4456 once a client GET's it. This is accomplished by requesting two web pages. The result will respond to the client with a JSON object: ...
3votes
1answer
623views
Returning the results of four $resource calls as a JSON array in AngularJS
Title pretty much says it. I need a way to elegantly handle multiple $resource calls in AngularJS. Right now, I just calling each other call on the ...
6votes
1answer
2kviews
Load JSON file into model using Javascript / jQuery (deferred, asynchronous)
As a beginner I am always determined to improve myself. I've got written the following Code using jQuery that is working fine. However, I am sure that there are cleaner ways for achieving the same. ...
1vote
1answer
7kviews
Node.js DynamoDB callback
I am writing an API which gets results from a DynamoDB table and puts the JSON back into the browser. The code below works and returns the desired results. However, after reading about async and ...